package com.yonyou.brigade.order_center.model;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 发票订单关联表
 * </p>
 *
 * @author houyb
 * @since 2020-03-03
 */
@TableName("invoice_relationship")
public class InvoiceRelationship extends Model<InvoiceRelationship> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
     * 订单号
     */
    @TableField("order_no")
    private String orderNo;
    /**
     * 订单类别
     */
    @TableField("order_classification")
    private String orderClassification;
    /**
     * 发票类型
     */
    @TableField("invoice_type")
    private String invoiceType;
    /**
     * 发票号码
     */
    @TableField("invoice_num")
    private String invoiceNum;
    /**
     * 发票代码
     */
    @TableField("invoice_code")
    private String invoiceCode;
    /**
     * 是否匹配1：匹配 0：取消匹配
     */
    private Integer valid;

    /**
     * 租户ID
     */
    private String tenant;

    /**
     * 时间戳
     */
    private Date ts;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    public String getOrderClassification() {
        return orderClassification;
    }

    public void setOrderClassification(String orderClassification) {
        this.orderClassification = orderClassification;
    }

    public String getInvoiceType() {
        return invoiceType;
    }

    public void setInvoiceType(String invoiceType) {
        this.invoiceType = invoiceType;
    }

    public String getInvoiceNum() {
        return invoiceNum;
    }

    public void setInvoiceNum(String invoiceNum) {
        this.invoiceNum = invoiceNum;
    }

    public String getInvoiceCode() {
        return invoiceCode;
    }

    public void setInvoiceCode(String invoiceCode) {
        this.invoiceCode = invoiceCode;
    }

    public Integer getValid() {
        return valid;
    }

    public void setValid(Integer valid) {
        this.valid = valid;
    }

    public String getTenant() {
        return tenant;
    }

    public void setTenant(String tenant) {
        this.tenant = tenant;
    }

    public Date getTs() {
        return ts;
    }

    public void setTs(Date ts) {
        this.ts = ts;
    }

    public static final String ID = "id";

    public static final String ORDER_NO = "order_no";

    public static final String ORDER_CLASSIFICATION = "order_classification";

    public static final String INVOICE_TYPE = "invoice_type";

    public static final String INVOICE_NUM = "invoice_num";

    public static final String INVOICE_CODE = "invoice_code";

    public static final String VALID = "valid";

    public static final String TENANT = "tenant";

    public static final String TS = "ts";

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "InvoiceRelationship{" +
        "id=" + id +
        ", orderNo=" + orderNo +
        ", orderClassification=" + orderClassification +
        ", invoiceType=" + invoiceType +
        ", invoiceNum=" + invoiceNum +
        ", invoiceCode=" + invoiceCode +
        ", valid=" + valid +
        ", tenant=" + tenant +
        ", ts=" + ts +
        "}";
    }
}
